package exam.demo17;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        StringBuffer str = new StringBuffer();
        if(n == 0) {
            System.out.println("0");
            return;
        }
        while(n != 0) {
            if(n % 2 == 0) {
                str.append("0");
            }else {
                str.append("1");
            }
            n /= 10;
        }
        str.reverse();
        int a = Integer.parseInt(str.toString());
        System.out.println(a);
    }
}
